<template>
  <div id="app">
    <nav>
      <!-- <router-link to="/">Home</router-link> |
      <router-link to="/about">About</router-link> -->
    </nav>
    <!-- <keep-alive v-bind:include="$store.state.isRouter">
      <router-view />
    </keep-alive> -->
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive" />
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive" />
  </div>
</template>
<script>
export default {
  name: 'VueProject01App',
  provide() {
    // return {reload : this.reload}
  },

  watch: {
    $route(to, from) {
      this.token = this.getToken();
    },
  },
  data() {
    return {};
  },

  mounted() {},

  methods: {
    getToken() {},
    // reload(){
    //   this.isRouterAlive=false
    //   this.$nextTick(function () {
    //     this.isRouterAlive=true
    //   });
    // }
  },
};
</script>
<style lang="scss">
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
li {
  list-style: none;
}

a {
  text-decoration: none;
  color: #333;
  outline: none;
}
</style>
